Skip to content

Conversation

@morphqdd
Copy link

@morphqdd morphqdd commented Oct 22, 2025

This pr adds flake.nix for installing eoc via the nix package manager.

It also adds flake.lock to freeze the versions of nix tools used for installation and updates REUSE.toml to ignore the presence of license headers in flake.lock, as it is generated automatically and contains only meta information for building, similar to package.lock.json.

README.md has also been updated, and a new way to download via nix has been added.

@morphqdd
Copy link
Author

@yegor256 take a look, please

This commit introduces a flake.nix file to build and package the eoc
command-line tool. It defines the package and application for multiple
systems using nixpkgs.
This commit refactors the flake.nix file to improve the structure
and readability of the package and app definitions. It introduces a
named `eoc` derivation within the `packages` definition.
The empty line was causing issues with some tools that parse the file.
Removing it resolves these issues.
npm is not needed as a native build input since it is included in nodejs.
The echo command in the buildPhase was unnecessary as npm install
already provides sufficient output.
This commit introduces node2nix to manage node dependencies, simplifying
the build process and improving reproducibility. It replaces the manual
npm commands with a more declarative approach.
This allows node2nix to access local files when building the package.
This change refactors the flake.nix file to use import instead of callPackage when calling the node2nix package. This improves modularity and readability.
The source path was pointing to the wrong directory, causing the build to fail.
This commit fixes the source path to point to the correct directory.
…ake.nix

This change simplifies the flake.nix file by using `callPackage`
instead of manually importing the `nix/default.nix` file. This
makes the code more concise and easier to read.
This change ensures that the node2nix packages are imported with
the nixpkgs context, resolving potential build issues.
This change updates the nodejs version used in the nix environment to version 18.
This ensures compatibility with newer dependencies and libraries.
This change upgrades the nodejs version used in the nix environment to
version 24. This ensures we are using a supported and up-to-date
version of nodejs.
This commit packages eolang as a Nix derivation, enabling reproducible builds and easy installation. The derivation includes build and install phases to manage dependencies and create the executable. The old node2nix files are no longer needed.
…g build

Prevents potential build issues and ensures a more predictable build process by disabling script execution during `npm install`.
This change updates the flake.nix to use `buildNpmPackage` for building
the eolang package, simplifying the build process and improving
dependency management.
The symlink pointed to a specific version which broke the build.
…nagement

This change refactors the flake.nix file to use `importNpmLock` for
managing npm dependencies. This ensures that the project uses
consistent versions of dependencies, improving reproducibility.
Additionally, it fixes/improves the CLI entrypoint.
The 'result' symlink was pointing to a Nix store path, which is not
portable and breaks the repository outside of the Nix environment.
Removing it ensures the repository is functional without Nix.
This commit ensures consistent formatting in the package.json file
by applying standard indentation and spacing.
This commit adds instructions on how to install EOLANG using Nix flakes,
providing flexibility and reproducibility for development environments.
…ples

Corrected "intall" to "install" and added more comprehensive Nix examples for different use cases.
This commit adds SPDX headers to the flake.nix file for license
compliance and clarity.
The flake.lock file was missing in REUSE.toml. Adding it to ensure
license compatibility checks are correctly performed for this file.

Fix: Add meta information to flake.nix

Adds description, homepage, license, and author information to the
flake.nix file for better package discoverability and clarity.
The previous version of flake.nix had a formatting issue that
caused an error during evaluation. This commit fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant